Electronic Device With Activity-Based Power Management

ABSTRACT

An electronic device may have a power system. The power system may receive power such as wireless power or wired power and may use a portion of the received power to charge a battery. Power consumption by control circuitry in the device can be adjusted by deactivating or activating processor cores in the control circuitry and by selectively starting or stopping software activities. By selectively reducing power consumption by circuitry in the electronic device other than battery charging circuitry in the power system that is charging the battery, additional power may be made available to charge the battery and/or battery capacity can be extended. The electronic device may reduce non-battery-charging activities in the device in response to information gathered with sensors such as motion and temperature information, information from the power system, information on device location, information on software settings, and other information.

This application is a division of U.S. patent application Ser. No.15/706,290, filed Sep. 15, 2017, which claims the benefit of provisionalpatent application No. 62/513,883, filed Jun. 1, 2017, each of which ishereby incorporated by reference herein in its entirety.

BACKGROUND

This relates generally to electronic devices, and, more particularly, topower management in electronic devices.

Portable electronic devices such as cellular telephones have batteries.If care is not taken, battery charging operations may not be managedsatisfactorily. As a result, devices may not be fully charged whenneeded, charging may interfere with other device operations, or chargingoperations may take longer than desired.

SUMMARY

An electronic device such as a portable electronic device may have apower system with a battery. The power system receives power such aswireless power or wired power and uses a portion of the received powerto charge the battery as needed.

Control circuitry in the portable electronic device is used to executecode. For example, software running on the control circuitry handlesbackground activities such as image processing tasks, datasynchronization tasks (e.g., downloading email), indexing, and otherbackground activities. Power consumption by the control circuitry can beadjusted by deactivating or activating processor cores in the controlcircuitry, by adjusting other hardware settings, and/or by selectivelystarting or stopping software activities.

By selectively throttling power consumption by circuitry other thanbattery charging circuitry, additional power may be made available tocharge the battery. The electronic device may prioritize charging of thebattery in the device in this way in response to information gatheredwith sensors such as motion and temperature information, informationfrom the power system, information on device location, information onsoftware settings, and other information.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an illustrative system including anelectronic device with a rechargeable battery in accordance with anembodiment.

FIG. 2 is a graph illustrating how device activities other than batterycharging activities can be adjusted during use of a device toaccommodate battery charging in accordance with an embodiment.

FIG. 3 is a flow chart of illustrative operations involved in usingequipment of the type shown in FIG. 1 in accordance with an embodiment.

DETAILED DESCRIPTION

Electronic devices with batteries may be charged using wireless (e.g.,inductive) charging equipment and wired power sources. As electronicdevices are used by a user, information on usage patterns can becollected. Sensors and other components can also gather information onthe operating environment of an electronic device. Based on thisinformation, battery charging operations can be optimized. In somearrangements, for example, an electronic device may make reductions tosoftware and hardware activity to give priority to battery chargingoperations.

An illustrative system that includes an electronic device with arechargeable battery is shown in FIG. 1. As shown in FIG. 1, system 8includes electronic devices such as electronic device 10. Electronicdevice 10 has battery 38. Electronic device 10 may be a cellulartelephone, a computer (e.g., a tablet computer or laptop computer), awristwatch device or other wearable equipment, and so forth.Illustrative configurations in which electronic device 10 is a portableelectronic device, may sometimes be described herein as an example.

As shown in FIG. 1, exemplary electronic device 10 has control circuitry12. Control circuitry 12 may include storage and processing circuitrysuch as processing circuitry associated with microprocessors, powermanagement units, baseband processors, digital signal processors,microcontrollers, and/or application-specific integrated circuits withprocessing circuits. Control circuitry 12 implements desired control andcommunications features in device 10. For example, control circuitry 12may be used in determining power transmission levels, processing sensordata, processing user input, and processing other information and inusing this information to adjust the operation of device 10 (e.g., toadjust parameters influencing battery charging). Control circuitry 12may be configured to perform these operations using hardware (e.g.,dedicated hardware or circuitry), firmware, and/or software. Softwarecode for performing these activities is stored on non-transitorycomputer readable storage media (e.g., tangible computer readablestorage media). The software code may sometimes be referred to assoftware, data, program instructions, instructions, or code. Thenon-transitory computer readable storage media may include non-volatilememory such as non-volatile random-access memory (NVRAM), one or morehard drives (e.g., magnetic drives or solid state drives), one or moreremovable flash drives or other removable media, or the like. Softwarestored on the non-transitory computer readable storage media may beexecuted on the processing circuitry of control circuitry 12. Theprocessing circuitry may include application-specific integratedcircuits with processing circuitry, one or more microprocessors, orother processing circuitry.

The processing circuitry of control circuitry 12 may have adjustablehardware resources. For example, control circuitry 12 may includemultiple processing cores 14 that can be selectively switched into orout of use. Control circuitry 12 may also have clock circuitry such asclock circuitry 16. Clock circuitry 16 may supply an adjustableprocessor clock (e.g., a processor clock with a frequency that can beadjusted between a low frequency f1 to conserve power and a highfrequency f2 to enhance processing speed). Clock circuitry 16 may alsomaintain information on the current time of day and date for device 10.

Device 10 has communications circuitry 18. Communications circuitry 18may include wired communications circuitry (e.g., circuitry fortransmitting and/or receiving digital and/or analog signals via a portassociated with a connector 40) and may include wireless communicationscircuitry 20 (e.g., radio-frequency transceivers and antennas) forsupporting communications with wireless equipment. Wirelesscommunications circuitry 20 may include wireless local area networkcircuitry (e.g., WiFi® circuitry), cellular telephone transceivercircuitry, satellite positioning system receiver circuitry (e.g., aGlobal Positioning System receiver for determining location, velocity,etc.), near-field communications circuitry and/or other wirelesscommunications circuitry.

Device 10 may use input-output devices 22 to receive input from a userand the operating environment of device 10 and to provide output.Input-output devices 22 may include one or more visual output devicessuch as display 24 (e.g., a liquid crystal display, an organiclight-emitting diode display, or other display). Input-output devices 22may also include buttons, joysticks, scrolling wheels, touch pads, keypads, keyboards, microphones, speakers, displays (e.g., touch screendisplays), tone generators, vibrators (e.g., piezoelectric vibratingcomponents, etc.), cameras, sensors, light-emitting diodes and otherstatus indicators, data ports, etc. Sensors 26 in input-output devices22 may include force sensors, touch sensors, capacitive proximitysensors, optical proximity sensors, ambient light sensors, temperaturesensors, air pressure sensors, gas sensors, particulate sensors,magnetic sensors, motion and orientation sensors (e.g., inertialmeasurement units based on one or more sensors such as accelerometer,gyroscopes, and magnetometers), strain gauges, etc.

Electronic device 10 may interact with equipment such as charging system42 (sometimes referred to as a charging mat, charging puck, poweradapter, etc.). Electronic device 10 may also interact with otherexternal equipment 44 (e.g., an accessory battery case, earphones,network equipment, etc.). Charging system 42 may include wired powercircuitry and/or wireless power circuitry. For example, charging system42 may include a wired power source that provides direct-current powerto device 10 from a mains power supply (e.g., system 42 may include analternating-current-to-direct current adapter, etc.). Direct-currentpower may also be supplied to device 10 from a battery case or otherexternal equipment 44 plugged into a port associated with a connectorsuch as one of connectors 40 in device 10 or other equipment forsupplying power such as direct-current power over a cable or other wiredlink coupled to connector 40. If desired, charging system 42 may includewireless power transmitting circuitry for supplying wireless power toelectronic device 10. Wireless power transmitting circuitry in system 42may, for example, include an oscillator and inverter circuitry thatdrives a signal into a coil and thereby causes the coil to produceelectromagnetic fields that are received by a corresponding coil indevice 10 (see, e.g., coil 32 and associated wireless power receiver 34in wireless power receiver circuitry 30). Configurations in whichwireless power is transmitted using capacitive coupling arrangements,near-field wireless power transmissions, and/or other wireless powerarrangements may also be used. The use of an inductive wireless powerarrangement in which system 42 and device 10 support inductive powertransfer is merely illustrative.

Using communications circuitry 18, device 10 can communicate withexternal equipment such as equipment 44. Equipment 44 may includeaccessories that can be communicatively coupled to device 10 (e.g., earbuds, covers, keyboards, mice, displays, etc.), may include wirelesslocal area network equipment and/or other computing equipment thatinteracts with device 10, may include peer devices (e.g., other devicessuch as device 10), may include covers, cases, and other accessorieswith optional supplemental batteries, and/or may include otherelectronic equipment.

Device 10 may include power circuitry such as power system 28 (sometimesreferred to as control circuitry). Power system 28 may include a batterysuch as battery 38. Battery 38 of device 10 may be used to power device10 when device 10 is not receiving wired or wireless power from anothersource. In some configurations, device 10 may use battery powerassociated with an accessory (e.g., external equipment 44). System 42may also power device 10 using wired or wireless power.

Power system 28 may be used in receiving wired power from an externalsource (e.g., system 42 or a battery case) and/or may include wirelesspower receiving circuitry 30 for receiving wirelessly transmitted powerfrom a corresponding wireless power transmitting circuit in system 42.Wireless power receiving circuitry 30 may, as an example, include a coilsuch as coil 32 and an associated wireless power receiver 34 (e.g., arectifier). During operation, coil 32 may receive wirelessly transmittedpower signals and wireless power receiver 34 may convert these receivedsignals into direct-current power for device 10. Power managementcircuit 36 may be used in managing the power from wireless powerreceiver 34. Power management circuitry 36 may be formed from one ormore power management unit integrated circuits and may form part ofcontrol circuitry 12 of FIG. 1. During operation, power managementcircuitry 36 may distribute received power to internal circuitry indevice 10 and/or to battery 38 (e.g., to charge battery 38).

The operation of power system 28 may be controlled based on the statusof battery 38 (e.g., the current level of charge in battery 38), basedon nature and quantity of power available from external sources (e.g., abattery in an accessory case, wired or wireless power from a powersource such as system 42, etc.), and based on other factors. Forexample, if battery 38 is depleted, charging of battery 38 may beprioritized over powering internal components in device 10. Batterycharging can also be prioritized based on current and/or historicalfactors related to the user's usage of device 10, measured temperatureinformation, whether device 10 is in motion or is stationary, based onposition information (e.g., satellite navigation system data indicatingwhere device 10 is currently located), information on the speed ofdevice 10 relative to the Earth (e.g., whether or not device 10 ismoving in a vehicle), information in a software program such as acalendar or other program, user settings, and/or other information.

In some situations, the amount of power received by device 10 fromexternal source(s) such as system 42 will be limited to a maximum amount(e.g., an amount dictated by the capabilities of a wireless charging mator other equipment that is being used to supply device 10 with power). Awireless charger may, for example, be capable of supplying device 10with a maximum of 5 W of wireless power. The internal power circuitry indevice 10 may also have a maximum capacity (e.g., a limit to avoidexcess currents, etc.). As a result, the amount of power that can bereceived by power system 28 and distributed to: 1) internal circuitry indevice 10 such as control circuitry 12, communications circuitry 18, andother non-battery-charging circuitry and 2) battery 38 is constrained.In these circumstances, device 10 benefits from intelligently allocatingpower between internal circuitry and battery 38. This helps ensure thatbattery 38 is charged at appropriate times at a suitably rapid pace.

If, as an example, the amount of power being received from system 42 ata given point in time is large, both the internal circuitry of device 10and battery 38 can receive essentially unlimited amounts of power solong as the inherent limitations on the circuitry of device 10 areobserved (e.g., thermal limits, current limits for safety, etc.). Thisallows battery 38 to be charged as rapidly as desired and simultaneouslyallows control circuitry 12 and/or other hardware in device 10 to drawas much power as desired to accomplish desired software and/or hardwareprocessing objectives such as gaming and/or video playback.

In many circumstances, however, available power is more limited. As anexample, wireless power transmission may be somewhat limited due to thewireless power delivery capabilities of system 42, due to suboptimalcoupling between system 42 and device 10, and/or due to the presence ofcompeting devices (e.g., other devices that are being simultaneouslycharged by system 42 and that are therefore competing for the wirelesspower being delivered by system 42). Particularly in power-limitedcircumstances, device 10 (e.g., control circuitry 12) analyzes currentand historical operating conditions and other information to determine asatisfactory allocation between using power to power control circuitry12 and other non-battery components in device 10 and using power tocharge battery 38. Once a desired allocation has been determined,control circuitry 12 can adjust the operation of device 10 so thatnon-battery components receive a first amount of power and so thatbattery 38 receives a second amount of power in an appropriate ratio(e.g., in an appropriate ratio between the first and second amounts).With one illustrative configuration, control circuitry 12 can makeadjustments to the software that is running on device 10 and thehardware of device that either increase or decrease the amount of powerconsumed by the non-battery-charging circuitry of device 10. Powermanagement circuit 36 (e.g., a battery charging circuit in circuit 36)may then automatically use all remaining power in charging battery 38.If it is desired to charge battery 38 rapidly, for example, non-criticalsoftware and/or hardware functions can be temporarily deactivated. Thiswill result in an increase in the amount of power available for chargingbattery 38.

Consider, as an example, the graph of system operation that is shown inFIG. 2. In the graph of FIG. 2, illustrative curve 50 represents thatamount of power as a function of time t that is being used to powercontrol circuitry 12 and other internal circuitry in device 10 otherthan the circuitry that charges battery 38. Illustrative curve 52represents the amount of remaining power available in device 10 tocharge battery 38. Initially, at times t between time t0 and time t1,software and hardware activities in device 10 take precedence overbattery charging. As a result, curve 50 is larger than curve 52 betweent0 and t1. This indicates that battery charging is being allowed toproceed at only a relatively modest rate. This mode of operation may beappropriate, for example, in a scenario in which device 10 is being usedat home in the evening, where there is ample time to charge device 10before device 10 is removed from the home. The relatively large amountof processing power that is being used between times t0 and t1 may beused, for example, for housekeeping activities such as image processingactivities for organizing photographs, for other indexing activities,and for on-line database synchronization services and other cloudservices.

At time t1, the user of device 10 may remove device 10 from the home(e.g., to take device 10 to the airport). While in the user'sautomobile, device 10 may be charged using a wired or wireless chargingsystem in the user's automobile. At time t1, device 10 can detect thatthe device is moving and optionally detect that it is located in anautomobile and can conclude that the user may soon be mobile outside ofthe automobile and unable to receive further charging. As a result, fromtime t1 to time t2, control circuitry 12 reduces the amount of power(curve 50) being drawn by non-battery circuitry in device 10, therebyenhancing the charging rate of battery 38 (curve 52) by directingavailable incoming power towards battery charging. At time t2, beforereaching the user's destination, the charge state of battery 38 rises toa nearly full state. At this point, control circuitry 12 can allow thenon-battery circuitry of device 10 to draw more power (e.g., curve 50may rise between time t2 and time t3). Due to the increase innon-battery circuit power consumption, the charging of battery 52 willbe somewhat reduced (curve 52 drops at time t2), but still results in anenhanced user experience as the battery has accumulated charge tosupport mobile use should the user do so.

In other scenarios, the detection of the presence of device 10 in anautomobile may be different and/or device 10 may control the ratiobetween non-battery and battery charging power consumption amounts bycontrolling the battery charger circuit in system 28. For example, ifbattery 38 is nearly charged when a user takes device 10 into theautomobile, control circuitry 12 may reduce the amount of power flowingto battery 38 to charge battery 38 to allow headroom for the processingcircuitry in device 10 (e.g., to allow power for circuitry 12 to handlea sudden increase in processing power when performing complex navigationtasks).

FIG. 3 is a flow chart of illustrative operations of system 8. Inparticular, the flow chart of FIG. 3 shows illustrative information thatmay be gathered by device 10 during operation in order to determine howto adjust power allocation between battery and non-battery resources.During the operations of FIG. 3, device 10 may gather information fromsensors and other sources and may use this information in controllingthe supply of power for battery charging of battery 38 and the supply ofpower to run control circuitry 12 (and other non-battery circuitry indevice 10).

During the operations of blocks 60, 62, 64, 68, and 70, device 10 (e.g.,control circuitry 12) may gather information on which to base a decisionon power allocation. In some embodiments, during the operations of block66, device 10 (e.g., control circuitry 12) makes correspondingadjustments to the operation of device 10, so that battery 38 and theremaining components in device 10 can receive appropriate respectiveportions of the available power. As an example, if additional power isdesired for charging battery 38, device 10, during the operations ofblock 66, reduces software activity (e.g., by terminating, temporarilystopping, or partially curtailing the execution of code on processor 12using a scheduling management subsystem or other resources on device 10)and/or reduces hardware activity (e.g., by halting code execution by oneor more cores 14 in processor 12, by reducing the processor clock forcontrol circuitry 12, and/or by selectively depowering power consumingcomponents in device 10). When curtailing software activity, theactivity that is curtailed can span one or more processes and/or mayinvolve one or more tasks associated with those processes. In anenvironment in which multiple software activities are being performed,one or more of these activities can be stopped to curtail activity.Hardware throttling may involve reducing the number of cores 14 that arein use and/or other adjustments to the circuitry of device 10 thataffect how much power is being consumed by device 10 (e.g., clocksettings, processor options, hardware accelerator options, wirelesscommunications settings and/or other communications circuit settings,display brightness settings, display refresh rate settings, displayresolution settings, etc.).

In some embodiments, the operations of block 66 involve reducingsoftware activity in device 10. For example, the amount of code-basedprocessor activity (e.g., processor activity involved in executingcomputer code) is reduced by terminating software tasks/processes. Thesoftware that is terminated is, for example, associated with operatingsystem functions. In one illustrative example, an operating systemfunction is used to cluster photographs by performing scene and/orfacial recognition on a library of images. This function may beprocessing intensive and may slow down device 10 by 25% or more whenactive. When it is desired to free up more power in device 10 forcharging battery 38, the image clustering function or other imageprocessing activities performed by device 10 is stopped (or reduced inspeed/intensity) before these activities reach their naturaltermination. As additional examples, email downloading activities and/oremail attachment downloading activities can be suspended, maintenancetasks associated with operating system functions may be terminated(e.g., tasks associated with compressing files, indexing files,uploading information to cloud servers, downloading and/or installingupdates, executing training algorithms (e.g., training algorithmsinvolving processing of location data to determine if a user is at homeor at work), and/or other power-intensive code-based processoractivities can be selectively suspended/terminated.

Hardware adjustments that can be made during the operations of block 66involve reducing processor clock speeds, limiting the maximum clockspeed associated with clock speed bursts, reducing the number ofprocessor cores that are active, turning off or otherwise adjustingcomponents that consume larger amounts of power (e.g., turning off asatellite navigation system receiver or reducing satellite navigationsystem receiver power consumption when not needed, turning offimage-based sensors, lowering maximum permitted screen brightness in adisplay, lowering display refresh rates, lowering display resolution,etc.).

Changes to software activity and/or hardware activity may be made basedon any suitable information gathered by device 10 and/or received bydevice 10 from remote equipment. For example, non-battery charging powerconsuming activities (code-based and/or hardware-based) may be adjustedbased on information gathered during operations of device 10 such as theoperations of blocks 60, 62, 64, 68, and 70.

During the illustrative operations of block 60, device 10 may determinethe current time of day (e.g., using clock 16) and may update historicalinformation on the usage of device 10. For example, information on whendevice 10 is being used by a user and which components are being usedand other status information may be maintained in a database in device10 and/or on a remote server. Whenever device 10 is used, additionalusage information may be stored in the database. In this way, device 10may be provided with a user profile of popular and unpopular usagetimes.

The usage history information maintained by device 10 may allow device10 to determine how to allocate power between non-battery-chargingoperations and battery charging operations. For example, usage historyinformation may indicate when a fully charged battery is desirable. If,as an illustrative example, a user's usage history indicates that auser's device is mobile for four hours every Thursday starting at 11 AMand is never charged during this time period (because charging is notavailable or is not convenient), device 10 can make adjustments duringthe operations of block 66 in advance of that time to ensure thatbattery 38 is fully charged by Thursday at 11 AM. As another example,battery charge state preservation may be prioritized during the middleof the day, when a user is generally away from charging locations and ismost likely in need of extended battery power. Late at night, when auser is likely sleeping, battery charging is expected to complete over aperiod of many hours (e.g., overnight), so device 10 need not prioritizebattery charging (e.g., background software tasks and otherdiscretionary activities in device 10 can be allowed to take place asexpected in an environment without power constraints).

Information from power system 28 may be gathered during the operationsof block 62. During the operations of block 62, device 10 may, forexample, gather information on whether charging system 42 is being usedto supply power to device 10, whether power is being provided wirelesslyor through a wired connection, etc. For example, device 10 can determinewhether power is being supplied from a wireless charging device.Information may be gathered on the charge state of battery 38, theamount of power being received by power system 28 from externalequipment such as system 42, the amount of power being requested bypower management circuit 36 to charge battery 38 (which may becomparable to the amount of delivered power or which may besignificantly less than the amount of power that system 42 is able todeliver), the maximum rating of system 42, and/or other information onthe power delivery environment and capabilities of system 8.

When it is determined that device 10 is in a location with amplecharging power, device 10 may increase non-battery-charging activitiesduring the operations of block 66. If, however, it is determined thatdevice 10 is running off of battery power in an accessory case (whetherfrom information device 10 receives during charging on the identity ofthe charging device or from additional information such as motion sensorinformation indicating that device 10 is not currently likely to bereceiving power from a power adapter plugged into a mains power supply),non-battery-charging activities can be throttled (reduced) to preservebattery power in device 10 and in the external case.

In some situations, device 10 may sense that a user is charging device10 at an unusual time of day (e.g. at a time of day that is nottypically associated with the user's normal charging routine). Ifabnormal charging patterns are detected, it can be assumed that the userhas an urgent charging need and battery charging activities can be givenprecedence over non-battery-charging activities. Device 10 may alsoconclude that charging needs are urgent and can prioritize chargingaccordingly in response to detecting that the charge level of battery 38has dipped below the user's normal lowest levels. In yet anotherillustrative arrangement, charging can be prioritized immediately upondetecting that device 10 has been coupled to a system 42 and isreceiving power. For example, device 10 may be disconnected from system42 (e.g., because a user is traveling away from the user's home oroffice). When the user arrives at the user's home or office, device 10may be coupled to system 42 (with a cable or wirelessly) and may startreceiving power from system 42. In response to detecting that device 10(power system 28) has transitioned from a first mode of operation inwhich power was not being received by device 10 and system 28 to asecond mode of operation in which power is being received by device 10and system 28, device 10 can (at least temporarily) reduce the amount ofpower that is being consumed by non-battery-charging operations, therebyfavoring battery charging and ensuring that battery 38 will be chargedexpeditiously.

During the operations of block 64, device 10 may gather sensorinformation from sensors 26 in device 10. As an example, device 10 cangather information from a temperature sensor and/or an ambient lightsensor. Temperature and/or ambient light information may be used todetermine whether device 10 is in an environment with elevatedtemperatures (e.g., a bright and hot outdoors environment, etc.).Information on the operating environment of device 10 may also begathered from on-line weather sources, from location information, etc.In operating environments with an elevated temperature and/or anelevated light exposure, there is an elevated sensitivity to operatingdevice 10 with high amounts of software and/or hardware activity. As aresult, when it is determined that device 10 is operating in a thermallychallenging environment, device 10 can proactively reduce softwareand/or hardware activity at block 66 to maintain device 10 below itsthermal limits and thereby maintain sufficient thermal headroom fordynamically demanded activities and battery charging.

As another example, device 10 (e.g., control circuitry 12) may gathermotion sensor information from an inertial measurement unit(accelerometer, compass, and/or magnetometer) during the operations ofblock 64. If desired, motion information can also be gathered from asatellite navigation system receiver in circuitry 20 during theoperations of block 70 (e.g., by gathering velocity information from thesatellite navigation system receiver and/or by comparing satellitenavigation system receiver location measurements over a known period oftime). By analyzing the speed of the user and other attributes of auser's motion (e.g., average and peak accelerometer values,accelerometer output trends, etc.), device 10 can determine whetherdevice 10 is stationary, whether device 10 is in motion in a vehiclesuch as an automobile, whether device 10 is in motion in a user's pocketor hand, whether a user of device 10 is walking or jogging, and/or otherattributes of the usage of device 10 related to device motion and/ororientation.

During the operations of block 66, device 10 can take appropriate actionin response to measured motion sensor information. If device 10 is beingcarried in the pocket of a user and is far away from a wireless chargingmat or other wireless power source, the power source will not be able todeliver power to device 10. Accordingly, if device 10 determines frommotion sensor data that device 10 is in motion in the pocket of a user,device 10 may conclude that wireless power for device 10 is notavailable. Device 10 may therefore take appropriate action at block 66such as reducing software and/or hardware activity to preserve batterycharge while device 10 is away from external power source 42. If, asanother example, a user is determined to be in motion in an automobile,device 10 can make power allocation adjustments suitable for use ofdevice 10 in an automobile environment. As one example, usage historyinformation or other information may indicate that the user's automobileis an environment in which the power delivery capacity of system 42 isweaker than in other environments. In this type of situation, device 10may reduce background software activity and/or other non-essentialactivity to help prioritize battery charging while maintain desiredprocessing headroom for navigation activities performed by device 10. Asanother example, if usage history information or other informationindicates that the user's automobile has readily available power, device10 may allow more background software activities to be performed.

In some situations, device 10 may not be able to determine from powersystem 28 whether device 10 is obtaining power from a power adapterplugged into a wall outlet or whether device 10 is receivingsupplemental battery power from an accessory battery case. By usingmotion information, device 10 can determine whether device 10 isstationary or is in motion. In situations in which device 10 is inmotion, device 10 can conclude that the user is away from a wall outletand is therefore in need of preserving battery charge. Device 10 cantherefore reduce software and hardware activity during the operations ofblock 66 to help preserve the charge on battery 38 and the battery inthe accessory case.

Information on device motion may, if desired, be stored with other usagedata in a usage database (e.g., with time/date stamps obtained from thecurrent time readings of block 60). This allows device 10 to build ahistogram of a user's stationary and mobile uses of device 10 and allowsdevice 10 to proactively adjust activities during block 66 (e.g., toprioritize battery charging over other operations at times just inadvance of the user's most prevalent mobile device usage times, etc.).

If desired, activity (one or more code-based processor activities and/orone or more hardware activities, etc.) can be stopped or otherwiseadjusted based on the type of power being delivered to device 10. If,for example, wireless power reception is detected at block 62, one ormore activities performed during wired power reception may be stopped(e.g., before their natural termination due to task completion, etc.).

The operations of block 70 may be used in gathering user positioninformation (e.g., geographic location information such as informationon whether a user is at home, is at work, is at frequently-visitedpublic location such as a gym, a coffee shop, etc.). Information on auser's location and daily activities can also be gathered from calendarentries and/or other software settings during the operations of block68. This information can be used to help prioritize battery chargingbefore time periods in which charging is not convenient or possible.

If, as an example, device 10 determines from a calendar entry in auser's calendar that a user is taking a plane flight from 1-4 PM onWednesday or is otherwise planning to participate in an activity inwhich wireless and/or wired charging from system 42 is not possible orinconvenient, device 10 can reduce activity for non-battery-chargingfunctions in advance. For example, device 10 can reduce software andhardware activity on Wednesday morning to reduce non-battery-chargingpower consumption and thereby prioritize battery charging. In this way,device 10 can ensure that battery 38 is fully charged before the user'sflight.

A user's charging history and other usage history can include locationdata (e.g., usage location) so that device 10 can predict when chargingis likely to occur and when charging is likely to be inconvenient basedon location. When a user is at a convenient charging location or isexpected to be arriving at a convenient charging location before battery38 has been depleted excessively, battery charge may be allowed to dropin favor of appropriate software and/or hardware activity. When a useris at an inconvenient charging location or is expected to be travellingto a location that is inconvenient for charging, battery charging can beprioritized to ensure that the user will have adequate battery reserveswhile at the inconvenient charging location. When a user is away fromany previously known locations, it may be assumed that the user istraveling and suitable actions taken to help extend battery power byreducing non-battery-charging activities during the operations of block66.

The foregoing is merely illustrative and various modifications can bemade to the described embodiments. The foregoing embodiments may beimplemented individually or in any combination.

What is claimed is:
 1. An electronic device comprising: a motion sensor;a battery; and control circuitry coupled to the battery and the motionsensor, wherein the control circuitry is configured to reduce powerconsumption by the control circuitry responsive to motion detected bythe motion sensor.
 2. The electronic device of claim 1, furthercomprising a satellite navigation system receiver configured to gathergeographic location information, wherein the control circuitry isconfigured to adjust the power consumption based on the locationinformation gathered with the satellite navigation system receiver. 3.The electronic device of claim 2, wherein the control circuitry isconfigured to gather velocity information using the satellite navigationsystem receiver and is configured to adjust the power consumption basedon the velocity information.
 4. The electronic device of claim 2,further comprising a wireless power system configured to receive powerwirelessly, wherein the control circuitry is configured to consume powerthrough code-based processor activity, and wherein the control circuitryis configured to, in response to detecting wireless power, reduce powerconsumption by reducing the code-based processor activity to increasepower available for charging the battery with the wireless power.
 5. Theelectronic device of claim 4, wherein the code-based processor activityincludes image processing operations and wherein the control circuitryis configured to, in response to detecting wireless power, reduce thepower consumption by stopping the image processing to increase poweravailable for charging the battery with the wireless power.
 6. Theelectronic device of claim 2, further comprising a wireless power systemconfigured to receive power wirelessly, wherein the control circuitry isconfigured to consume power through code-based processor activity andcircuit-based activity including power consumption from multipleprocessor cores in the control circuitry, and wherein the controlcircuitry is configured to, in response to detecting wireless power,reduce the power consumption by suspending use of one of the processorcores to increase power available for charging the battery with thewireless power.
 7. The electronic device of claim 1, wherein the controlcircuitry is configured to determine time of day and wherein the controlcircuitry is further configured to adjust the power consumption based onthe time of day.
 8. The electronic device of claim 7, wherein thecontrol circuitry is configured to maintain charging history informationon charging of the battery, and wherein the control circuitry isconfigured to adjust the power consumption based on the charging historyinformation and the time of day.
 9. An electronic device comprising: asatellite navigation system receiver configured to gather geographiclocation information; a battery; and control circuitry coupled to thebattery and the satellite navigation system receiver, wherein thecontrol circuitry is configured to reduce power consumption by thecontrol circuitry responsive to motion identified by the geographiclocation information gathered by the satellite navigation systemreceiver.
 10. The electronic device of claim 9, wherein the controlcircuitry is configured to reduce the power consumption in response tothe electronic device receiving power via a wired connection while thegeographic location information identifies that the electronic device isin motion.
 11. The electronic device of claim 9, wherein the controlcircuitry is configured to gather velocity information using thesatellite navigation system receiver and is configured to adjust thepower consumption based on the velocity information.
 12. The electronicdevice of claim 9, wherein the control circuitry is configured toconsume power through code-based processor activity and wherein thecontrol circuitry is configured to reduce the power consumption byreducing the code-based processor activity to increase power availablefor charging the battery.
 13. The electronic device of claim 9, whereinthe control circuitry comprises processor cores and wherein the controlcircuitry is configured to reduce the power consumption by suspendinguse of one of the processor cores to increase power available forcharging the battery.
 14. The electronic device of claim 9, wherein thecontrol circuitry is configured to determine time of day and wherein thecontrol circuitry is further configured to adjust the power consumptionbased on the time of day.
 15. The electronic device of claim 14, whereinthe control circuitry is configured to maintain charging historyinformation on charging of the battery, and wherein the controlcircuitry is configured to adjust the power consumption based on thecharging history information and the time of day.
 16. A non-transitorycomputer-readable storage medium storing one or more programs configuredto be executed by one or more processors of an electronic device havingcontrol circuitry, a motion sensor, and a battery, the one or moreprograms including instructions for: gathering motion sensor data usingthe motion sensor; and responsive to the motion sensor data gatheredusing the motion sensor, reducing power consumption by the controlcircuitry.
 17. The non-transitory computer-readable storage medium ofclaim 16, further comprising instructions for: responsive to the motionsensor data gathered using the motion sensor, reducing code-basedprocessor activity at the control circuitry.
 18. The non-transitorycomputer-readable storage medium of claim 16, further comprisinginstructions for: responsive to the motion sensor data gathered usingthe motion sensor, suspending use of a processor core in the electronicdevice.
 19. The non-transitory computer-readable storage medium of claim16, further comprising instructions for: gathering geographic locationinformation using a satellite navigation system receiver; and adjustingthe power consumption based on the location information gathered withthe satellite navigation system receiver.
 20. The non-transitorycomputer-readable storage medium of claim 19, further comprisinginstructions for: gathering velocity information using the satellitenavigation system receiver; and adjusting the power consumption based onthe velocity information.